#pragma once

#include "CommonParam.h"

class CEphemParam: public CCommonParam
{
	typedef map<CStdString, CStdString> MapEphemPath;

	CEphemParam(LPCTSTR stzFileSettingsName);
public:
	CEphemParam(void);
	virtual ~CEphemParam(void);

	LPCTSTR GetCurrentEphem() const;
	LPCTSTR GetCurrentEphemPath() const;

	LPCTSTR GetEphemName(LPCTSTR stzEphemName) const;
	LPCTSTR GetEphemPath(LPCTSTR stzEphemName) const;
	int GetCount() const;
	bool GetNames(list<LPCTSTR> &listNames) const;

	bool AddEphem(LPCTSTR stzEphemName, LPCTSTR stzEphemPath);
	bool RemoveEphem(LPCTSTR stzEphemName);

	bool ShowSettings();
	bool SetCurrentEphem(LPCTSTR stzCurEphem);
protected:
	MapEphemPath	m_mapEphemPath;
	CStdString		m_strCurrentEphem;

	static int					s_count;
	static CCriticalSection		s_cs;
	static auto_ptr<CEphemParam> s_pStaticParam;
};
